package org.example.game.weekly.game414;

/**
 * @Description: TODO
 * @Author wyatt
 * @Data 2024/08/03 20:45
 */
public class Solution001 {

    public static void main(String[] args) {
        System.out.println(new Solution001().convertDateToBinary("1900-01-01"));
    }

    public String convertDateToBinary(String date) {
        String[] arr = date.split("-");
        StringBuilder stringBuilder = new StringBuilder();

        for (int i = 0; i < arr.length; i++) {
            stringBuilder.append(Integer.toBinaryString(Integer.parseInt(arr[i])));
            if(i<arr.length-1){
                stringBuilder.append("-");
            }
        }

        return stringBuilder.toString();
    }

}
